home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
byt85apr.lbr
/
EXAMPLES.LQR
/
EXAMPLE1.PAS
next >
Wrap
Pascal/Delphi Source File
|
1985-09-15
|
384b
|
18 lines
PROGRAM Average (input,output);
VAR Sum, Count, New: INTEGER;
Avg: REAL;
BEGIN
Sum := 0;
Count := 0;
Read (New);
WHILE New<>9999 DO
BEGIN
Sum := Sum+New;
Count := Count+1;
New := New + 1
END;
Avg := Sum/Count;
WRITELN ('The average is ',avg);
END;